/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.assignment2.Polymorphism.config;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Bean;
import za.ac.cput.assignment2.Polymorphism.Food;
import za.ac.cput.assignment2.Polymorphism.impl.Banana;
import za.ac.cput.assignment2.Polymorphism.impl.Rice;

/**
 *
 * @author Siya
 */
@Configurable
public class AppConfig {
    
    @Bean(name = "fruit")
    public Food eat(){
        
        return new Banana();
        
    }
    
    @Bean(name = "eat")
    public Food cook(){
    
        return new Rice();
    }
            


}
